<!-- laoni -->
<!-- SvgIcon.vue -->

<template>
    <svg
      :class="svgClass"
      aria-hidden="true"
    >
      <use :xlink:href="iconName" />
    </svg>
  </template>
  
  <script>
  export default {
    name: 'SvgIcon1',
    props: {
      name: {
        type: String,
        required: true
      },
      className: {
        type: String,
        default: ''
      }
    },
    computed: {
      iconName() {
        return `#icon-${this.name}`
      },
      svgClass() {
        if (this.className) {
          return 'svg-icon ' + this.className
        } else {
          return 'svg-icon'
        }
      }
    }
  }
  </script>
  
  <style scoped>
  .svg-icon {
    width: 10px !important;
    height: 10px !important;
    /* vertical-align: -0.15em; */
    fill: currentColor;
    overflow: hidden; 
    color: black;
    display: block;
  }
  
  .svg-external-icon {
    background-color: currentColor;
    mask-size: cover !important;
    display: inline-block;
  }
  </style>
  
  